package com.woniuxy.creditsystem.common.handler;
import com.woniuxy.creditsystem.common.bean.ResultMsg;
import org.apache.shiro.authz.AuthorizationException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 全局异常处理器
 */
@RestControllerAdvice
public class GlobalExceptionHandler {
    /**
     * 异常处理方法
     * @param e
     * @return
     */
   /* @ExceptionHandler
    public ResultMsg handler(Exception e){
        if(e instanceof AuthorizationException){
            return new ResultMsg(10001,"没有权限，请联系管理员！",null);
        }
//        if(e instanceof RuntimeException){}
        return new ResultMsg(10000,"系统繁忙，请稍后重试！",null);
    }*/

}